home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / music / musgfa.zoo / testdosn.lst < prev   
File List  |  1992-12-24  |  857b  |  38 lines

  1. DIM music_data&(50000)
  2. CLS
  3. PRINT "This program plays an *.xbs file on the"
  4. PRINT "Atari ST sound chip using the xbios"
  5. PRINT "32 call (dosound). Using this call"
  6. PRINT "music is played in the background while"
  7. PRINT "the computer is running a program. See"
  8. PRINT "source program for sample code."
  9. PRINT "...hit space bar to continue"
  10. DO UNTIL k$<>""
  11.   k$=INKEY$
  12. LOOP
  13. REPEAT
  14.   @read_sound
  15.   IF EXIST(xbs$)=TRUE
  16.     @dosound
  17.   ELSE
  18.     STOP
  19.   ENDIF
  20. UNTIL FALSE
  21. > PROCEDURE dosound
  22.   LOCAL i%
  23.   '  SPOKE &H484,PEEK(&H484) AND NOT 1
  24.   addr%=V:music_data&(0)
  25.   ~XBIOS(32,L:addr%)
  26. RETURN
  27. > PROCEDURE read_sound
  28.   LOCAL a%
  29.   FILESELECT #"input file","*.xbs","noname.xbs",xbs$
  30.   PRINT "Input file = ";xbs$
  31.   IF EXIST(xbs$)=-1
  32.     OPEN "i",#1,xbs$
  33.     a%=LOF(#1)
  34.     CLOSE #1
  35.     BLOAD xbs$,VARPTR(music_data&(0))
  36.   ENDIF
  37. RETURN
  38.